<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 10] Math</TITLE>
<META NAME="author" CONTENT="Mark Grand">
<META NAME="date" CONTENT="Fri Aug  8 15:25:28 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="java">
<META NAME="title" CONTENT="Java Language Reference">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java Language Reference" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch10_11.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 10<br>The java.lang Package</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch10_13.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Math</H1>

<H2>Name</H2>

Math

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.90">Synopsis</A></h2>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Class Name:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.lang.Math</tt>

<p>
<DT CLASS=varlistentry>Superclass:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.lang.Object</tt>

<p>
<DT CLASS=varlistentry>Immediate Subclasses:<br>
<DD>

<P CLASS=para>
None

<p>
<DT CLASS=varlistentry>Interfaces Implemented:<br>
<DD>

<P CLASS=para>
None

<p>
<DT CLASS=varlistentry>Availability:<br>
<DD>

<P CLASS=para>
JDK 1.0 or later</DL>
</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.91">Description</A></h2>

<P CLASS=para>
<A NAME="MAN.MATH.1"></A>The <tt CLASS=literal>Math</tt> class contains constants for the
mathematical values pi and <I CLASS=emphasis>e</I>. The class also
defines methods that compute various mathematical functions, such
as trigonometric and exponential functions. All of these constants
and methods are <tt CLASS=literal>static</tt>. In other words, it
is not necessary to create an instance of the <tt CLASS=literal>Math</tt>
class in order to use its constants and methods. In fact, the <tt CLASS=literal>Math</tt>
class does not define any <tt CLASS=literal>public</tt> constructors,
so it cannot be instantiated.

<P CLASS=para>
To ensure that the methods in this class return consistent
results under different implementations of Java, all of the methods
use the algorithms from the well-known Freely-Distributable Math
Library package, <I CLASS=emphasis>fdlibm</I>. This package is part
of the network library <I CLASS=emphasis>netlib</I>. The library
can be obtained through the URL <I class=emphasis>http://netlib.att.com</I>.
The algorithms used in this class are from the version of <I CLASS=emphasis>fdlibm</I>
dated January 4, 1995. <I CLASS=emphasis>fdlibm</I> provides more
than one definition for some functions. In those cases, the "IEEE
754 core function" version is used.

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.92">Class Summary</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public final class java.lang.Math extends java.lang.Object {
    // Constants
    public static final double E;
    public static final double PI;
    // Class Methods
    public static int abs(int a);
    public static long abs(long a);
    public static float abs(float a);
    public static double abs(double a);
    public static native double acos(double a);
    public static native double asin(double a);
    public static native double atan(double a);
    public static native double atan2(double a, double b);
    public static native double ceil(double a);
    public static native double cos(double a);
    public static native double exp(double a);
    public static native double floor(double a);
    public static native double IEEEremainder(double f1, double f2);
    public static native double log(double a);
    public static int max(int a, int b);
    public static long max(long a, long b);
    public static float max(float a, float b);
    public static double max(double a, double b);
    public static int min(int a, int b);
    public static long min(long a, long b);
    public static float min(float a, float b);
    public static double min(double a, double b);
    public static native double pow(double a, double b);
    public static synchronized double random();
    public static native double rint(double a);
    public static int round(float a);
    public static long round(double a);
    public static native double sin(double a);
    public static native double sqrt(double a);
    public static native double tan(double a);
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.93">Constants</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.229">E</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.249"><tt CLASS=literal>public static final double E = 2.7182818284590452354</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
The value of this constant is <I CLASS=emphasis>e</I>, the
base for natural logarithms.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.230">PI</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.250"><tt CLASS=literal>public static final double PI = 3.14159265358979323846</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
The value for this constant is pi.</DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.94">Class Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.231">abs</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.251"><tt CLASS=literal>public static double abs(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The absolute value of its argument.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the absolute value of its argument.

<P CLASS=para>
If the argument to this method is negative or positive zero,
the method should return positive zero. 
If the argument is positive or negative infinity,
the method returns positive infinity. If the argument is NaN, the
method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.252"><tt CLASS=literal>public static float abs(float a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The absolute value of its argument.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the absolute value of its argument.

<P CLASS=para>
If the argument to this method is negative or positive zero,
the method should return positive zero. 
If the argument is positive or negative infinity,
the method returns positive infinity. If the argument is NaN, the
method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.253"><tt CLASS=literal>public static int abs(int a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
An <tt CLASS=literal>int</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The absolute value of its argument.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the absolute value of its argument.

<P CLASS=para>
If the argument is <tt CLASS=literal>Integer.MIN_VALUE</tt>, the
method actually returns <tt CLASS=literal>Integer.MIN_VALUE</tt> because
the true absolute value of <tt CLASS=literal>Integer.MIN_VALUE</tt>
is one greater than the largest positive value that can be represented
by an <tt CLASS=literal>int</tt>.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.254"><tt CLASS=literal>public static long abs(long a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>long</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The absolute value of its argument.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the absolute value of its argument.

<P CLASS=para>
If the argument is <tt CLASS=literal>Long.MIN_VALUE</tt>, the method
actually returns <tt CLASS=literal>Long.MIN_VALUE</tt> because the true
absolute value of <tt CLASS=literal>Long.MIN_VALUE</tt> is one greater
than the largest positive value represented by a <tt CLASS=literal>long</tt>.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.232">acos</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.255"><tt CLASS=literal>public static native double acos(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value greater than or
equal to <tt CLASS=literal>-1.0</tt> and less than or equal to <tt CLASS=literal>1.0</tt>.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The arc cosine measured in radians; the result is greater
than or equal to <tt CLASS=literal>0.0</tt> and less than or equal to pi.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the arc cosine of the given value.

<P CLASS=para>
If the value is NaN or its absolute value is greater than
<tt CLASS=literal>1.0</tt>, the method returns NaN.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.233">asin</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.256"><tt CLASS=literal>public static native double asin(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value greater than or
equal to <tt CLASS=literal>-1.0</tt> and less than or equal to <tt CLASS=literal>1.0</tt>.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The arc sine measured in radians; the result is greater than
or equal to -pi/2 and less than or equal to pi/2.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the arc sine of the given value.

<P CLASS=para>
If the value is NaN or its absolute value is greater than
<tt CLASS=literal>1.0</tt>, the method returns NaN. If the value is
positive zero, the method returns positive zero. If the value is
negative zero, the method returns negative zero.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.234">atan</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.257"><tt CLASS=literal>public static native double atan(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value greater than or
equal to <tt CLASS=literal>-1.0</tt> and less than or equal to <tt CLASS=literal>1.0</tt>.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The arc tangent measured in radians; the result is greater
than or equal to -pi/2 and less than or equal to pi/2.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the principle value of the arc tangent
of the given value.

<P CLASS=para>
If the value is NaN, the method returns NaN. If the value
is positive zero, the method returns positive zero. If the value
is negative zero, the method returns negative zero.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.235">atan2</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.258"><tt CLASS=literal>public static native double atan2(double a, double b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The theta component of the polar coordinate (<I CLASS=emphasis>r</I>,theta)
that corresponds to the cartesian coordinate (<tt CLASS=literal>a</tt>,<tt CLASS=literal>b</tt>);
the result is measured in radians and is greater than or equal to
-pi and less than or equal to pi.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the theta component of the polar coordinate
(<I CLASS=emphasis>r</I>,theta) that corresponds to the cartesian coordinate
(<tt CLASS=literal>a</tt>,<tt CLASS=literal>b</tt>). It computes theta as the
principle value of the arc tangent of <tt CLASS=literal>b</tt>/<tt CLASS=literal>a</tt>,
using the signs of both arguments to determine the quadrant (and
sign) of the return value.

<P CLASS=para>
If either argument is NaN, the method returns NaN.

<P CLASS=para>
If the first argument is positive zero and the second argument
is positive, then the method returns positive zero. If the first argument
is positive zero and the second argument is negative, then the method
returns the <tt CLASS=literal>double</tt> value closest to pi.

<P CLASS=para>
If the first argument is negative zero and the second argument
is positive, the method returns negative zero. If the first argument
is negative zero and the second argument is negative, the method
returns the <tt CLASS=literal>double</tt> value closest to -pi.

<P CLASS=para>
If the first argument is positive and finite and the second
argument is positive infinity, the method returns positive zero.
If the first argument is positive and finite and the second argument
is negative infinity, the method returns the <tt CLASS=literal>double</tt>
value closest to pi.

<P CLASS=para>
If the first argument is negative and finite and the second
argument is positive infinity, the method returns negative zero.
If the first argument is negative and finite and the second argument
is negative infinity, the method returns the <tt CLASS=literal>double</tt>
value closest to -pi.

<P CLASS=para>
If the first argument is positive and the second argument
is positive zero or negative zero, the method returns the <tt CLASS=literal>double</tt>
value closest to pi/2. If the first argument is negative and the
second argument is positive or negative zero, the method returns
the <tt CLASS=literal>double</tt> value closest to -pi/2.

<P CLASS=para>
If the first argument is positive infinity and the second
argument is finite, the method returns the <tt CLASS=literal>double</tt>
value closest to pi/2. If the first argument is negative infinity
and the second argument is finite, the method returns the <tt CLASS=literal>double</tt>
value closest to -pi/2.

<P CLASS=para>
If both arguments are positive infinity, the method returns
the <tt CLASS=literal>double</tt> value closest to pi/4. If the first
argument is positive infinity and the second argument is negative
infinity, the method returns the <tt CLASS=literal>double</tt> value
closest to 3pi/4. If the first argument is negative infinity and
the second argument is positive infinity, the method returns the
<tt CLASS=literal>double</tt> value closest to -pi/4. If both arguments
are negative infinity, the method returns the <tt CLASS=literal>double</tt>
value closest to -3pi/4.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.236">ceil</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.259"><tt CLASS=literal>public static native double ceil(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The smallest integer greater than or equal to the given value.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method performs the ceiling operation. It returns the
smallest integer that is greater than or equal to its argument.

<P CLASS=para>
If the argument is NaN, an infinity value, or a zero value,
the method returns that same value. If the argument is less than
zero but greater than <tt CLASS=literal>-1.0</tt>, the method returns
negative zero.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.237">cos</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.260"><tt CLASS=literal>public static native double cos(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value that's an angle
measured in radians.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The cosine of the given angle.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the cosine of the given angle measured
in radians.

<P CLASS=para>
If the angle is NaN or an infinity value, the method returns
NaN.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.238">exp</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.261"><tt CLASS=literal>public static native double exp(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>e^a</tt>

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the exponential function of <tt CLASS=literal>a</tt>.
In other words, <I CLASS=emphasis>e</I> is raised to the value specified
by the parameter <tt CLASS=literal>a</tt>, where <I CLASS=emphasis>e</I>
is the base of the natural logarithms.

<P CLASS=para>
If the value is NaN, the method returns NaN. If the value
is positive infinity, the method returns positive infinity. If the
value is negative infinity, the method returns positive zero.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.239">floor</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.262"><tt CLASS=literal>public static native double floor(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The greatest integer less than or equal to the given value.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method performs the floor operation. It returns the largest
integer that is less than or equal to its argument.

<P CLASS=para>
If the argument is NaN, an infinity value, or a zero value,
the method returns that same value.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.240">IEEEremainder</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.263"><tt CLASS=literal>public static native double IEEEremainder(double a, double b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The remainder of <tt CLASS=literal>a</tt> divided by <tt CLASS=literal>b</tt>
as defined by the IEEE 754 standard.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the remainder of <tt CLASS=literal>a</tt>
divided by <tt CLASS=literal>b</tt> as defined by the IEEE 754 standard.
This operation involves first determining the mathematical quotient
of <tt CLASS=literal>a</tt>/<tt CLASS=literal>b</tt> rounded to the nearest
integer. If the quotient is equally close to two integers, it is
rounded to the even integer. The method then returns <tt CLASS=literal>a-(b x </tt><tt CLASS=replaceable><i>Q</i></tt><tt CLASS=literal>)</tt>,
where <tt CLASS=replaceable><i>Q</i></tt> is the rounded quotient.

<P CLASS=para>
If either argument is NaN, the method returns NaN. If the
first argument is positive or negative infinity and the second argument
is positive or negative zero, the method also returns NaN. If the
first argument is a finite value and the second argument is positive
or negative infinity, the method returns its first argument.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.241">log</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.264"><tt CLASS=literal>public static native double log(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value that is greater
than <tt CLASS=literal>0.0</tt>.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The natural logarithm of <tt CLASS=literal>a</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the natural logarithm (base <I CLASS=emphasis>e</I>)
of its argument.

<P CLASS=para>
In particular, if the argument is positive infinity, the method
returns positive infinity. If the argument is positive or negative
zero, the method returns negative infinity. If the argument is less
than zero, the method returns NaN. If the argument is NaN, the method
returns NaN.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.242">max</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.265"><tt CLASS=literal>public static double max(double a, double b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The greater of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the greater of its two arguments. In other
words, it returns the one that is closer to positive infinity.

<P CLASS=para>
If one argument is positive zero and the other is negative
zero, the method returns positive zero. If either argument is NaN,
the method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.266"><tt CLASS=literal>public static float max(float a, float b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The greater of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the greater of its two arguments. In other
words, it returns the one that is closer to positive infinity.

<P CLASS=para>
If one argument is positive zero and the other is negative
zero, the method returns positive zero. If either argument is NaN,
the method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.267"><tt CLASS=literal>public static int max(int a, int b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
An <tt CLASS=literal>int</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
An <tt CLASS=literal>int</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The greater of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the greater of its two arguments. In other
words, it returns the one that is closer to <tt CLASS=literal>Integer.MAX_VALUE</tt>.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.268"><tt CLASS=literal>public static long max(long a, long b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>long</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>long</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The greater of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the greater of its two arguments. In other
words, it returns the one that is closer to <tt CLASS=literal>Long.MAX_VALUE</tt>.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.243">min</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.269"><tt CLASS=literal>public static double min(double a, double b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The lesser of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the lesser of its two arguments. In other
words, it returns the one that is closer to negative infinity.

<P CLASS=para>
If one argument is positive zero and the other is negative
zero, the method returns negative zero. If either argument is NaN,
the method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.270"><tt CLASS=literal>public static float min(float a, float b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The lesser of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the lesser of its two arguments. In other
words, it returns the one that is closer to negative infinity.

<P CLASS=para>
If one argument is positive zero and the other is negative
zero, the method returns negative zero. If either argument is NaN,
the method returns NaN.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.271"><tt CLASS=literal>public static int min(int a, int b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
An <tt CLASS=literal>int</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
An <tt CLASS=literal>int</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The lesser of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the lesser of its two arguments. In other
words, it returns the one that is closer to <tt CLASS=literal>Integer.MIN_VALUE</tt>.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.272"><tt CLASS=literal>public static long min(long a, long b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>long</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>long</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The lesser of <tt CLASS=literal>a</tt> and <tt CLASS=literal>b</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the lesser of its two arguments. In other
words, it returns the one that is closer to <tt CLASS=literal>Long.MIN_VALUE</tt>.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.244">pow</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.273"><tt CLASS=literal>public static native double pow(double a, double b)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>a^b</tt>

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method computes the value of raising <tt CLASS=literal>a</tt>
to the power of <tt CLASS=literal>b</tt>.

<P CLASS=para>
If the second argument is positive or negative zero, the method
returns <tt CLASS=literal>1.0</tt>. If the second argument is <tt CLASS=literal>1.0</tt>,
the method returns its first argument. If the second argument is
NaN, the method returns NaN. If the first argument is NaN and the
second argument is nonzero, the method returns NaN.

<P CLASS=para>
If the first argument is positive zero and the second argument
is greater than zero, the method returns positive zero. If the first
argument is positive zero and the second argument is less than zero,
the method returns positive infinity.

<P CLASS=para>
If the first argument is positive infinity and the second
argument is less than zero, the method returns positive zero. If
the first argument is positive infinity and the second argument
is greater than zero, the method returns positive infinity.

<P CLASS=para>
If the absolute value of the first argument is greater than
<tt CLASS=literal>1</tt> and the second argument is positive infinity,
the method returns positive infinity. If the absolute value of the
first argument is greater than <tt CLASS=literal>1</tt> and the second
argument is negative infinity, the method returns positive zero.
If the absolute value of the first argument is less than <tt CLASS=literal>1</tt>
and the second argument is negative infinity, the method returns
positive infinity. If the absolute value of the first argument is
less than <tt CLASS=literal>1</tt> and the second argument is positive
infinity, the method returns positive zero. If the absolute value
of the first argument is <tt CLASS=literal>1</tt> and the second argument
is positive or negative infinity, the method returns NaN.

<P CLASS=para>
If the first argument is negative zero and the second argument
is greater than zero but not a finite odd integer, the method returns
positive zero. If the first argument is negative zero and the second
argument is a positive finite odd integer, the method returns negative
zero. If the first argument is negative zero and the second argument
is less than zero but not a finite odd integer, the method returns
positive infinity. If the first argument is negative zero and the
second argument is a negative finite odd integer, the method returns
negative infinity.

<P CLASS=para>
If the first argument is negative infinity and the second
argument is less than zero but not a finite odd integer, the method
returns positive zero. If the first argument is negative infinity
and the second argument is a negative finite odd integer, the method
returns negative zero. If the first argument is negative infinity
and the second argument is greater than zero but not a finite odd
integer, the method returns positive infinity. If the first argument
is negative infinity and the second argument is a positive finite
odd integer, the method returns negative infinity.

<P CLASS=para>
If the first argument is less than zero and the second argument
is a finite even integer, the method returns the result of the absolute
value of the first argument raised to the power of the second argument.
If the first argument is less than zero and the second argument
is a finite odd integer, the method returns the negative of the
result of the absolute value of the first argument raised to the
power of the second argument. If the first argument is finite and
less than zero and the second argument is finite and not an integer,
the method returns NaN.

<P CLASS=para>
If both arguments are integer values, the method returns the
first argument raised to the power of the second argument.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.245">random</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.274"><tt CLASS=literal>public static synchronized double random()</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A random number between <tt CLASS=literal>0.0</tt> and <tt CLASS=literal>1.0</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns a random number greater than or equal to <tt CLASS=literal>0.0</tt>
and less than <tt CLASS=literal>1.0</tt>. The implementation of this method uses
the <tt CLASS=literal>java.util.Random</tt> class. You may prefer to
use the <tt CLASS=literal>Random</tt> class directly, in order to gain
more control over the distribution, type, and repeatability of the
random numbers you are generating.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.246">rint</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.275"><tt CLASS=literal>public static native double rint(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The value of its argument rounded to the nearest integer.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns its argument rounded to the nearest integer;
the result is returned as a <tt CLASS=literal>double</tt> value. If
the argument is equidistant from two integers (e.g., <tt CLASS=literal>1.5</tt>),
the method returns the even integer.

<P CLASS=para>
If the argument is an infinity value, a zero value, or NaN,
the method returns that same value.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.247">round</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.276"><tt CLASS=literal>public static long round(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The value of its argument rounded to the nearest <tt CLASS=literal>long</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns its <tt CLASS=literal>double</tt> argument
rounded to the nearest integral value and converted to a <tt CLASS=literal>long</tt>.
If the argument is equidistant from two integers, the method returns
the greater of the two integers.

<P CLASS=para>
If the argument is positive infinity or any other value greater
than <tt CLASS=literal>Long.MAX_VALUE</tt>, the method returns <tt CLASS=literal>Long.MAX_VALUE</tt>.
If the argument is negative infinity or any other value less than
<tt CLASS=literal>Long.MIN_VALUE</tt>, the method returns <tt CLASS=literal>Long.MIN_VALUE</tt>.
If the argument is NaN, the method returns <tt CLASS=literal>0</tt>.</DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.277"><tt CLASS=literal>public static int round(float a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>float</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The value of its argument rounded to the nearest <tt CLASS=literal>int</tt>.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns its <tt CLASS=literal>float</tt> argument
rounded to the nearest integral value and converted to an <tt CLASS=literal>int</tt>.
If the argument is equidistant from two integers, the method returns
the greater of the two integers.

<P CLASS=para>
If the argument is positive infinity or any other value greater
than the <tt CLASS=literal>Integer.MAX_VALUE</tt>, the method returns <tt CLASS=literal>Integer.MAX_VALUE</tt>.
If the argument is negative infinity or any other value less than
<tt CLASS=literal>Integer.MIN_VALUE</tt>, the method returns <tt CLASS=literal>Integer.MIN_VALUE</tt>.
If the argument is NaN, the method returns <tt CLASS=literal>0</tt>.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.248">sin</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.278"><tt CLASS=literal>public static native double sin(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value that's an angle
measured in radians.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The sine of the given angle.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the sine of the given angle measured in
radians.

<P CLASS=para>
If the angle is NaN or an infinity value, the method returns
NaN. If the angle is positive zero, the method returns positive
zero. If the angle is negative zero, the method returns negative
zero.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.249">sqrt</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.279"><tt CLASS=literal>public static native double sqrt(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The square root of its argument.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the square root of its argument.

<P CLASS=para>
If the argument is negative or NaN, the method returns NaN.
If the argument is positive infinity, the method returns positive
infinity. If the argument is positive or negative zero, the method
returns that same value.</DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch10-REFSECT2-AUTOID.250">tan</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch10-REFSECT3-AUTOID.280"><tt CLASS=literal>public static native double tan(double a)</tt></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>a</tt><br>
<DD>

<P CLASS=para>
A <tt CLASS=literal>double</tt> value that is an angle
measured in radians.</DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The tangent of the given angle.

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the tangent of the given angle measured
in radians.

<P CLASS=para>
If the angle is NaN or an infinity value, the method returns
NaN. If the angle is positive zero, the method returns positive
zero. If the angle is negative zero, the method returns negative
zero.</DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.95">Inherited Methods</A></h2>

<DIV CLASS=informaltable>
<P>
<TABLE CLASS=INFORMALTABLE>
<TR CLASS=row>
<TH ALIGN="left">

<P CLASS=para>
Method</TH>
<TH ALIGN="left">

<P CLASS=para>
Inherited From</TH>
<TH ALIGN="left">

<P CLASS=para>
Method</TH>
<TH ALIGN="left">

<P CLASS=para>
Inherited From</TH>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>clone()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>equals(Object)</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>finalize()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>getClass()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>hashCode()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>notify()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>notifyAll()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>toString()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>wait()</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>wait(long)</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>wait(long, int)</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal></tt></TD>
<TD ALIGN="left">

<P CLASS=para>
<tt CLASS=literal></tt></TD>
</TR>
</TABLE>
<P>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch10-REFSECT1-AUTOID.96">See Also</A></h2>

<P CLASS=para>
<A HREF="ch10_08.htm">Double</A>;
<A HREF="ch10_09.htm">Float</A>;
<A HREF="ch02_02.htm#JLR2-CH-2-SECT-2.3.2">Floating-point literals</A>;
<A HREF="ch03_01.htm#JLR2-CH-3-SECT-1.1.2">Floating-point types</A>;
<A HREF="ch10_10.htm">Integer</A>;
<A HREF="ch02_02.htm#JLR2-CH-2-SECT-2.3.1">Integer literals</A>;
<A HREF="ch03_01.htm#JLR2-CH-3-SECT-1.1.1">Integer types</A>;
<A HREF="ch10_11.htm">Long</A>;
<A HREF="ch10_14.htm">Object</A>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch10_11.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch10_13.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Long</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Number</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
